import request from '@/config/axios'

export interface AccountingMendWorkMonadVO {
  id: number
  taskBeginIssuedDate: localdate
  taskEndIssuedDate: localdate
  staffName: string
  manHourType: string
  skyVaildManHour: number
  productNumber: string
  drawingNumber: string
  material: string
  operationNumber: string
  operationName: string
  taskQuantity: number
  processQuantity: number
  qualifiedQuantity: number
  remark: string
  yardmanOpinion: number
  inspectorOpinion: number
  quotaManHour: number
  mendWorkNumber: string
}

// 查询工资核算 --  车间工资核算 -- 补工单列表
export const getAccountingMendWorkMonadPage = async (params) => {
  return await request.get({ url: `/salary/accounting-mend-work-monad/page`, params })
}

// 查询工资核算 --  车间工资核算 -- 补工单详情
export const getAccountingMendWorkMonad = async (id: number) => {
  return await request.get({ url: `/salary/accounting-mend-work-monad/get?id=` + id })
}

// 新增工资核算 --  车间工资核算 -- 补工单
export const createAccountingMendWorkMonad = async (data: AccountingMendWorkMonadVO) => {
  return await request.post({ url: `/salary/accounting-mend-work-monad/create`, data })
}

// 修改工资核算 --  车间工资核算 -- 补工单
export const updateAccountingMendWorkMonad = async (data: AccountingMendWorkMonadVO) => {
  return await request.put({ url: `/salary/accounting-mend-work-monad/update`, data })
}

// 删除工资核算 --  车间工资核算 -- 补工单
export const deleteAccountingMendWorkMonad = async (id: number) => {
  return await request.delete({ url: `/salary/accounting-mend-work-monad/delete?id=` + id })
}

// 导出工资核算 --  车间工资核算 -- 补工单 Excel
export const exportAccountingMendWorkMonad = async (data) => {
  return await request.download({ url: `/salary/accounting-mend-work-monad/export-excel`, data })
}
